package com.taotao.rest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.common.pojo.TaotaoResult;
import com.taotao.rest.service.IItemParamItemService;

@Controller
@RequestMapping("/item/param/item")
public class ItemParamItemController {
	@Autowired
	private IItemParamItemService itemParamItemService;

	@RequestMapping("/info/{itemId}")
	@ResponseBody
	public TaotaoResult getItemParamItemByItemId(@PathVariable Long itemId) {
		TaotaoResult taotaoResult = this.itemParamItemService
				.getItemParamById(itemId);
		if (taotaoResult.getStatus() == 200) {
			return taotaoResult;
		}
		return null;
	}
}
